package mybatis.test;

import java.util.List;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import db.Dao.UserDao;
import db.model.User;

/**
 * @author DGW-PC
 * @data   2017年9月10日
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations= {"classpath:app.xml"})
public class Dbtest {
	@Autowired
	UserDao userdao;
	
	@Test	
	public void test() {
		List<User> all = userdao.selectAll();
		for (User user : all) {
			System.out.println(user);
		}
	}

}
